//==================================================
// 作 者：曾浩
// 日 期：2012-03-15
// 描 述：介绍本文件所要完成的功能以及背景信息等等
//==================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CoreFrame.Core.Orm;
using System.Data;

namespace MarchEstate.Manager.BusinesEntity
{
	[Serializable]
	[Table(TableName = "WY_ServiceItem", EntityType = EntityType.Table, IsGB = false)]
	public abstract class AbstractServiceItem : CoreFrame.Business.AbstractBusines
	{
		private string _code;//
		/// <summary>
		/// 
		/// </summary>
		[Column(FieldName = "Code", DataKey = true, IsSingleQuote = true, Match = "", IsInsert = true)]
		public string Code
		{
			get { return _code; }
			set { _code = value; }
		}
		private string _itemname;//
		/// <summary>
		/// 
		/// </summary>
		[Column(FieldName = "ItemName", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
		public string ItemName
		{
			get { return _itemname; }
			set { _itemname = value; }
		}

        private int _itemtype;//
        /// <summary>
        /// 
        /// </summary>
        [Column(FieldName = "ItemType", DataKey = false, IsSingleQuote = false, Match = "", IsInsert = true)]
        public int ItemType
        {
            get { return _itemtype; }
            set { _itemtype = value; }
        }

		private string _statcode;//
		/// <summary>
		/// 统计分类代码
		/// </summary>
		[Column(FieldName = "StatCode", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
		public string StatCode
		{
			get { return _statcode; }
			set { _statcode = value; }
		}
		private decimal _price;//单价
		/// <summary>
		/// 单价
		/// </summary>
		[Column(FieldName = "Price", DataKey = false, IsSingleQuote = false, Match = "", IsInsert = true)]
		public decimal Price
		{
			get { return _price; }
			set { _price = value; }
		}

        private int _deleteflag;
        /// <summary>
        /// 删除标志 1删除
        /// </summary>
        [Column(FieldName = "DeleteFlag", DataKey = false, IsSingleQuote = false, Match = "", IsInsert = true)]
        public int DeleteFlag
        {
            get { return _deleteflag; }
            set { _deleteflag = value; }
        }

        public abstract bool Save(string type);

        public abstract bool Delete(int _code);

        public abstract AbstractServiceItem GetServiceItem(string _code);
        /// <summary>
        /// 查询服务项目
        /// </summary>
        /// <param name="_statCode">统计分类 -1全部 </param>
        /// <returns></returns>
        public abstract List<AbstractServiceItem> GetServiceItemList(string _statCode,string _type);

        /// <summary>
        /// 保存统计分类
        /// </summary>
        /// <param name="code"></param>
        /// <param name="statname"></param>
        /// <returns></returns>
        public abstract bool SaveStatItem(string type,string code,string statname);
        /// <summary>
        /// 得到统计分类
        /// </summary>
        /// <returns></returns>
        public abstract DataTable GetStatItemData();
        /// <summary>
        /// 删除统计分类
        /// </summary>
        /// <param name="code"></param>
        /// <returns></returns>
        public abstract bool DeleteStatItem(string code);
	}
}